package com.hpjpw.ido.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 守护关系对象 ido_guard
 * 
 * @author hpj
 * @date 2021-01-02
 */
@ApiModel("GuardDomain")
public class Guard extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 守护关系ID */
    @Excel(name = "守护关系ID")
    @ApiModelProperty("守护关系ID")
    private Long id;

    /** 守护者ID（用户ID） */
    @Excel(name = "守护者ID", readConverterExp = "用=户ID")
    @ApiModelProperty("守护者ID")
    private Long guardianId;

    /** 被守护者ID（用户ID） */
    @Excel(name = "被守护者ID", readConverterExp = "用=户ID")
    @ApiModelProperty("被守护者ID")
    private Long protectedId;

    /** 关系生成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "关系生成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("关系生成时间")
    private Date time;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setGuardianId(Long guardianId) 
    {
        this.guardianId = guardianId;
    }

    public Long getGuardianId() 
    {
        return guardianId;
    }
    public void setProtectedId(Long protectedId) 
    {
        this.protectedId = protectedId;
    }

    public Long getProtectedId() 
    {
        return protectedId;
    }
    public void setTime(Date time) 
    {
        this.time = time;
    }

    public Date getTime() 
    {
        return time;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("guardianId", getGuardianId())
            .append("protectedId", getProtectedId())
            .append("time", getTime())
            .toString();
    }
}
